Optimal. Leaf size=207 \[ \frac{(A+2 B-5 C) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{3 a^2 d}+\frac{(A+2 B-5 C) \sin (c+d x) \sec ^{\frac{3}{2}}(c+d x)}{3 a^2 d (\sec (c+d x)+1)}-\frac{(B-4 C) \sin (c+d x) \sqrt{\sec (c+d x)}}{a^2 d}+\frac{(B-4 C) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a^2 d}-\frac{(A-B+C) \sin (c+d x) \sec ^{\frac{5}{2}}(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.38067, antiderivative size = 207, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 43, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.163, Rules used = {4084, 4019, 3787, 3771, 2641, 3768, 2639} \[ \frac{(A+2 B-5 C) \sin (c+d x) \sec ^{\frac{3}{2}}(c+d x)}{3 a^2 d (\sec (c+d x)+1)}+\frac{(A+2 B-5 C) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 a^2 d}-\frac{(B-4 C) \sin (c+d x) \sqrt{\sec (c+d x)}}{a^2 d}+\frac{(B-4 C) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a^2 d}-\frac{(A-B+C) \sin (c+d x) \sec ^{\frac{5}{2}}(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4084
Rule 4019
Rule 3787
Rule 3771
Rule 2641
Rule 3768
Rule 2639
Rubi steps
\begin{align*} \int \frac{\sec ^{\frac{3}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx &=-\frac{(A-B+C) \sec ^{\frac{5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{\int \frac{\sec ^{\frac{3}{2}}(c+d x) \left (\frac{3}{2} a (A+B-C)+\frac{1}{2} a (A-B+7 C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{3 a^2}\\ &=\frac{(A+2 B-5 C) \sec ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^{\frac{5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{\int \sqrt{\sec (c+d x)} \left (\frac{1}{2} a^2 (A+2 B-5 C)-\frac{3}{2} a^2 (B-4 C) \sec (c+d x)\right ) \, dx}{3 a^4}\\ &=\frac{(A+2 B-5 C) \sec ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^{\frac{5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{(A+2 B-5 C) \int \sqrt{\sec (c+d x)} \, dx}{6 a^2}-\frac{(B-4 C) \int \sec ^{\frac{3}{2}}(c+d x) \, dx}{2 a^2}\\ &=-\frac{(B-4 C) \sqrt{\sec (c+d x)} \sin (c+d x)}{a^2 d}+\frac{(A+2 B-5 C) \sec ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^{\frac{5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{(B-4 C) \int \frac{1}{\sqrt{\sec (c+d x)}} \, dx}{2 a^2}+\frac{\left ((A+2 B-5 C) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx}{6 a^2}\\ &=\frac{(A+2 B-5 C) \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{3 a^2 d}-\frac{(B-4 C) \sqrt{\sec (c+d x)} \sin (c+d x)}{a^2 d}+\frac{(A+2 B-5 C) \sec ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^{\frac{5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{\left ((B-4 C) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \sqrt{\cos (c+d x)} \, dx}{2 a^2}\\ &=\frac{(B-4 C) \sqrt{\cos (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{a^2 d}+\frac{(A+2 B-5 C) \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{3 a^2 d}-\frac{(B-4 C) \sqrt{\sec (c+d x)} \sin (c+d x)}{a^2 d}+\frac{(A+2 B-5 C) \sec ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^{\frac{5}{2}}(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}\\ \end{align*}
Mathematica [C] time = 4.44942, size = 567, normalized size = 2.74 \[ \frac{2 \cos ^4\left (\frac{1}{2} (c+d x)\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (4 A \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )-2 \sqrt{2} B \csc (c) e^{-i d x} \sqrt{\frac{e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt{1+e^{2 i (c+d x)}} \left (\left (-1+e^{2 i c}\right ) e^{2 i d x} \text{Hypergeometric2F1}\left (\frac{1}{2},\frac{3}{4},\frac{7}{4},-e^{2 i (c+d x)}\right )-3 \sqrt{1+e^{2 i (c+d x)}}\right )+8 B \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )+8 \sqrt{2} C \csc (c) e^{-i d x} \sqrt{\frac{e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt{1+e^{2 i (c+d x)}} \left (\left (-1+e^{2 i c}\right ) e^{2 i d x} \text{Hypergeometric2F1}\left (\frac{1}{2},\frac{3}{4},\frac{7}{4},-e^{2 i (c+d x)}\right )-3 \sqrt{1+e^{2 i (c+d x)}}\right )-20 C \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )-2 \sqrt{\sec (c+d x)} \left (\sec \left (\frac{c}{2}\right ) (A-B+C) \sin \left (\frac{d x}{2}\right ) \sec ^3\left (\frac{1}{2} (c+d x)\right )+\tan \left (\frac{c}{2}\right ) (A-B+C) \sec ^2\left (\frac{1}{2} (c+d x)\right )-2 \sec \left (\frac{c}{2}\right ) (A+2 B-5 C) \sin \left (\frac{d x}{2}\right ) \sec \left (\frac{1}{2} (c+d x)\right )-2 \tan \left (\frac{c}{2}\right ) (A+2 B-5 C)+6 (B-4 C) \csc (c) \cos (d x)\right )\right )}{3 a^2 d (\sec (c+d x)+1)^2 (A \cos (2 (c+d x))+A+2 B \cos (c+d x)+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 5.62, size = 559, normalized size = 2.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (C \sec \left (d x + c\right )^{3} + B \sec \left (d x + c\right )^{2} + A \sec \left (d x + c\right )\right )} \sqrt{\sec \left (d x + c\right )}}{a^{2} \sec \left (d x + c\right )^{2} + 2 \, a^{2} \sec \left (d x + c\right ) + a^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{\frac{3}{2}}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]